package com.ophiux.cs.application.user.dto;

import com.ophiux.cs.application.core.RequestDTO;
import com.ophiux.cs.application.core.ResultEnum;
import com.ophiux.cs.application.core.Throws.ParamException;
import com.ophiux.utils.common.StringUtil;

/**
 * 添加用户登录记录 接口dto
 * @author ADMIN
 *
 */
public class addUserRecoreRequest extends RequestDTO{
	
	private String USER_ID;//用户ID 唯一
	private String LOGIN_TOKEN;//用户登录秘钥  唯一  单次登录唯一标志
	private String PLATFORM_ID;//登录平台标识 关联发布平台表“ophiux_publish_platforms”
	public String getUSER_ID() {
		return USER_ID;
	}
	public void setUSER_ID(String uSER_ID) {
		USER_ID = uSER_ID;
	}
	public String getLOGIN_TOKEN() {
		return LOGIN_TOKEN;
	}
	public void setLOGIN_TOKEN(String lOGIN_TOKEN) {
		LOGIN_TOKEN = lOGIN_TOKEN;
	}
	public String getPLATFORM_ID() {
		return PLATFORM_ID;
	}
	public void setPLATFORM_ID(String pLATFORM_ID) {
		PLATFORM_ID = pLATFORM_ID;
	}
	
	/**
	 * 验证传递参数是否为空
	 * @throws ParamException
	 */
	public void paramVer() throws ParamException{
		if(StringUtil.isEmpty(this.USER_ID)) {
			throw new  ParamException(ResultEnum.requestParamFail.getCode(), "USER_ID不可为空");
		}
		if(StringUtil.isEmpty(this.LOGIN_TOKEN)) {
			throw new  ParamException(ResultEnum.requestParamFail.getCode(), "LOGIN_TOKEN不可为空");
		}
//		if(StringUtil.isEmpty(this.PLATFORM_ID)) {
//			throw new  ParamException(ResultEnum.requestParamFail.getCode(), ResultEnum.requestParamFail.getMsg());
//		}
	}
	@Override
	public boolean isParamValid() {
		
		return false;
	}
	
}
